#include "CheckPointActivateCommand.h"

CheckPointActivateCommand::CheckPointActivateCommand(CheckPoint* receiver): checkpoint(receiver)
{
}

CheckPointActivateCommand::CheckPointActivateCommand(const CheckPointActivateCommand& rhs): GameCommand(rhs), checkpoint(rhs.checkpoint)
{
}

CheckPointActivateCommand::~CheckPointActivateCommand()
{
}

void CheckPointActivateCommand::Execute()
{
	if (checkpoint)
	{
		checkpoint->Reached();
	}
}

GameCommand* CheckPointActivateCommand::Clone() const
{
	return new CheckPointActivateCommand(*this);
}
